"""
2)
https://habr.com/ru/articles/825206/
Работа пула процессов
"""
from multiprocessing import Pool


def say_hello(name: str) -> str:
    return f'Привет, {name}'


if __name__ == "__main__":
    with Pool() as process_pool:  # Создание пула процессов
        hi_jeff = process_pool.apply(say_hello, args=('Jeff',))
        hi_john = process_pool.apply(say_hello, args=('John',))
        print(hi_jeff)
        print(hi_john)
